﻿using System.Diagnostics.Contracts;

namespace d_rail.lib.Model
{
    public abstract class Track
    {
        /// <summary>
        /// All tracks have string or int Id
        /// </summary>
        private string _id = "";
        public string Id 
        {
            get
            {
                Contract.Ensures(Contract.Result<string>() != null);
                Contract.Ensures(Contract.Result<string>() == this._id);
                return _id;
            } 
            set
            {
                Contract.Requires(!string.IsNullOrEmpty(value));
                Contract.Ensures(value == this._id);
                _id = value;
            } 
        }
    }
}
